package com.itheima.youdianda.pojo;

import cn.hutool.core.date.DateTime;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.xml.soap.Text;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

@Data
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
public class SysUser implements Serializable {
    private static final long serialVersionUID = 1L;

    private String id;
    private String loginName;
    private String password;
    private String name;
    private String email;
    private String phone;
    private String loginIp;
    private LocalDateTime loginDate;
    private LocalDateTime createDate;
    private LocalDateTime updateDate;
    private Character delFlag;

    @JsonProperty("role_id")
    @TableField(typeHandler = JacksonTypeHandler.class)//将list转成json
    private String roleId;
    //private List<String> roleId;

    private Integer status;
    private String defaultData;

    @TableField(exist = false)
    private List<String> rolename;

}
